import request from '@/utils/request.js'

/** 分页获取历史工单列表
 * @param { string } mobile 手机号
*/
export function getHistoryWorkListAPI(params) {
	let url = `/workorder/work/page`
	if(params.status === '2') {
		url = `'/workorder/work/historyPage'`
	}
	return request({
		url: url,
		method: 'get',
		params: params
	});
}

/** 新增事件表单 */
export function addWorkOrderAPI(data) {
	return request({
		url: '/workorder/work/add',
		method: 'post',
		data: data
	});
}


/** 获取事件详情 */
export function getOrderInfoAPI(id) {
	return request({
		url: `/workorder/work/getById?id=${id}`,
		method: 'get'
	});
}


/** 删除事件详情 */
export function deleteOrderAPI(id) {
	return request({
		url: `/workorder/work/del?id=${id}`,
		method: 'delete'
	});
}






